#
# /*
#  *  This program is free software: you can redistribute it and/or modify
#  *  it under the terms of the GNU General Public License as published by
#  *  the Free Software Foundation, either version 3 of the License, or
#  *  (at your option) any later version.
#  *
#  *  This program is distributed in the hope that it will be useful,
#  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
#  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#  *  GNU General Public License for more details.
#  *
#  *  You should have received a copy of the GNU General Public License
#  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
#  *
#  *  The four essential freedoms with GNU GPL software:
#  *  The freedom to run the program, for any purpose
#  *  The freedom to study how the program works, and change it to make it do what you wish
#  *  The freedom to redistribute copies so you can others
#  *  The freedom to distribute copies of your modified versions to others
#  */
#

lib_LIBRARIES = libmooigraph.a
libmooigraph_a_CFLAGS = @CFLAGS@ @PACKAGE_CFLAGS@ @WARNING_CFLAGS@
libmooigraph_a_SOURCES = \
	lmg.c \
	lmgbary.c \
	lmgconn.c \
	lmgcycles.c \
	lmgdfs.c \
	lmginout.c \
	lmglevel.c \
	lmgmem.c \
	lmgne.c \
	lmgself.c \
	lmgsplay.c \
	lmgsplit.c \
	lmguniqn.c \
	lmguniqs.c \
	lmgvar.c

bin_PROGRAMS=mooigraph

# gtk+ version
dist_mooigraph_SOURCES = \
	main.c \
	misc.c \
	parse.c \
	mpool.c \
	tys.flex.c \
	dot.flex.c \
	splay_tree.c \
	uniqstring.c \
	uniqnode.c \
	color.c \
	pos.c \
	nes.c \
	options.flex.c \
	graphml.c

# gtk+ version
mooigraph_SOURCES = \
	main.c \
	misc.c \
	parse.c \
	mpool.c \
	tys.flex.c \
	dot.flex.c \
	splay-tree.c \
	uniqstring.c \
	uniqnode.c \
	color.c \
	pos.c \
	nes.c \
	options.flex.c \
	graphml.c

# gtk+ version
mooigraph_CFLAGS = \
	@CFLAGS@ @PACKAGE_CFLAGS@ @WARNING_CFLAGS@ @GTK_CFLAGS@ @XML_CPPFLAGS@ -Wall

# gtk+ version
mooigraph_tolink = \
	@GTK_LIBS@ @XML_LIBS@

# gtk+ version
mooigraph: $(mooigraph_SOURCES)
	$(CC) $(mooigraph_CFLAGS) $(mooigraph_SOURCES) -I. -I.. $(mooigraph_tolink) -lm libmooigraph.a -o mooigraph


# make clean will run this
clean-generic:
	echo "running clean-generic"
	echo "gcc rtl generated files"
	rm -v -f *[0-9]r.*
	rm -v -f *[0-9]t.*
	rm -v -f O1
	rm -v -f O2
	rm -v -f OO1
	rm -v -f OO2
	rm -v -f gmon.out
	rm -v -f dmake.output
	rm -v -f dsmake.output
	rm -v -f dsmake.errors
	rm -v -f dsmake.warnings
	rm -v -f *~

# end.
